package com.dz.xjd.ui.fragment;

import android.view.View;
import android.widget.TextView;
import com.dz.xjd.R;
import com.dz.xjd.app.App;
import com.dz.xjd.bean.UserBean;
import com.dz.xjd.ui.base.BaseFragment;
import butterknife.BindView;
import butterknife.OnClick;

public class PersonalFragment extends BaseFragment {

    @BindView(R.id.tv_load_record)
    TextView mTvLoadRecord;

    @BindView(R.id.tv_personal_settings)
    TextView mTvSettings;

    @BindView(R.id.tv_help_center)
    TextView mTvHelp;

    @BindView(R.id.tv_head_phone)
    TextView mTvPhone;

    @BindView(R.id.tv_head_shiming)
    TextView mTvShiming;

    @BindView(R.id.tv_head_name)
    TextView mTvName;


    @Override
    protected int getLayoutId() {
        return R.layout.fragment_personal;
    }

    @Override
    protected void initView() {

        if(App.mUserBean != null){
            UserBean mUserBean = App.mUserBean;
            mTvPhone.setText(mUserBean.getPhone());
            mTvName.setText(mUserBean.getRealname());
            if(mUserBean.getRealstatus() == 0){
                mTvShiming.setText("未实名");
            }else if(mUserBean.getRealstatus() == 1){
                mTvShiming.setText("已实名");
            }else{
                mTvShiming.setText("待认证");
            }
        }

    }

    @Override
    public void initPresenter() {

    }

    @OnClick({R.id.tv_load_record, R.id.tv_personal_settings, R.id.tv_help_center})
    void onClick(View v) {
        switch (v.getId()){
            case R.id.tv_load_record :
                break;

            case R.id.tv_personal_settings :

                break;

            case R.id.tv_help_center :

                break;
        }
    }

}
